3.2.18 \(\int \frac {3-x^2}{\sqrt {3-3 x^2-x^4}} \, dx\) [118]

Optimal. Leaf size=92 \[ -\sqrt {\frac {1}{2} \left (3+\sqrt {21}\right )} E\left (\sin ^{-1}\left (\sqrt {\frac {2}{-3+\sqrt {21}}} x\right )|\frac {1}{2} \left (-5+\sqrt {21}\right )\right )+\sqrt {3+2 \sqrt {21}} F\left (\sin ^{-1}\left (\sqrt {\frac {2}{-3+\sqrt {21}}} x\right )|\frac {1}{2} \left (-5+\sqrt {21}\right )\right ) \]

[Out]

-1/2*EllipticE(x*2^(1/2)/(-3+21^(1/2))^(1/2),1/2*I*7^(1/2)-1/2*I*3^(1/2))*(6+2*21^(1/2))^(1/2)+EllipticF(x*2^(
1/2)/(-3+21^(1/2))^(1/2),1/2*I*7^(1/2)-1/2*I*3^(1/2))*(3+2*21^(1/2))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {1194, 538, 435, 430} \begin {gather*} \sqrt {3+2 \sqrt {21}} F\left (\text {ArcSin}\left (\sqrt {\frac {2}{-3+\sqrt {21}}} x\right )|\frac {1}{2} \left (-5+\sqrt {21}\right )\right )-\sqrt {\frac {1}{2} \left (3+\sqrt {21}\right )} E\left (\text {ArcSin}\left (\sqrt {\frac {2}{-3+\sqrt {21}}} x\right )|\frac {1}{2} \left (-5+\sqrt {21}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(3 - x^2)/Sqrt[3 - 3*x^2 - x^4],x]

[Out]

-(Sqrt[(3 + Sqrt[21])/2]*EllipticE[ArcSin[Sqrt[2/(-3 + Sqrt[21])]*x], (-5 + Sqrt[21])/2]) + Sqrt[3 + 2*Sqrt[21
]]*EllipticF[ArcSin[Sqrt[2/(-3 + Sqrt[21])]*x], (-5 + Sqrt[21])/2]

Rule 430

Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_)^2]), x_Symbol] :> Simp[(1/(Sqrt[a]*Sqrt[c]*Rt[-d/c, 2]
))*EllipticF[ArcSin[Rt[-d/c, 2]*x], b*(c/(a*d))], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && Gt
Q[a, 0] &&  !(NegQ[b/a] && SimplerSqrtQ[-b/a, -d/c])

Rule 435

Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[(Sqrt[a]/(Sqrt[c]*Rt[-d/c, 2]))*Ell
ipticE[ArcSin[Rt[-d/c, 2]*x], b*(c/(a*d))], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[a, 0
]

Rule 538

Int[((e_) + (f_.)*(x_)^(n_))/(Sqrt[(a_) + (b_.)*(x_)^(n_)]*Sqrt[(c_) + (d_.)*(x_)^(n_)]), x_Symbol] :> Dist[f/
b, Int[Sqrt[a + b*x^n]/Sqrt[c + d*x^n], x], x] + Dist[(b*e - a*f)/b, Int[1/(Sqrt[a + b*x^n]*Sqrt[c + d*x^n]),
x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&  !(EqQ[n, 2] && ((PosQ[b/a] && PosQ[d/c]) || (NegQ[b/a] && (PosQ[
d/c] || (GtQ[a, 0] && ( !GtQ[c, 0] || SimplerSqrtQ[-b/a, -d/c]))))))

Rule 1194

Int[((d_) + (e_.)*(x_)^2)/Sqrt[(a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4], x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}
, Dist[2*Sqrt[-c], Int[(d + e*x^2)/(Sqrt[b + q + 2*c*x^2]*Sqrt[-b + q - 2*c*x^2]), x], x]] /; FreeQ[{a, b, c,
d, e}, x] && GtQ[b^2 - 4*a*c, 0] && LtQ[c, 0]

Rubi steps

\begin {align*} \int \frac {3-x^2}{\sqrt {3-3 x^2-x^4}} \, dx &=2 \int \frac {3-x^2}{\sqrt {-3+\sqrt {21}-2 x^2} \sqrt {3+\sqrt {21}+2 x^2}} \, dx\\ &=\left (9+\sqrt {21}\right ) \int \frac {1}{\sqrt {-3+\sqrt {21}-2 x^2} \sqrt {3+\sqrt {21}+2 x^2}} \, dx-\int \frac {\sqrt {3+\sqrt {21}+2 x^2}}{\sqrt {-3+\sqrt {21}-2 x^2}} \, dx\\ &=-\sqrt {\frac {1}{2} \left (3+\sqrt {21}\right )} E\left (\sin ^{-1}\left (\sqrt {\frac {2}{-3+\sqrt {21}}} x\right )|\frac {1}{2} \left (-5+\sqrt {21}\right )\right )+\sqrt {3+2 \sqrt {21}} F\left (\sin ^{-1}\left (\sqrt {\frac {2}{-3+\sqrt {21}}} x\right )|\frac {1}{2} \left (-5+\sqrt {21}\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 10.10, size = 107, normalized size = 1.16 \begin {gather*} -\frac {i \left (\left (-3+\sqrt {21}\right ) E\left (i \sinh ^{-1}\left (\sqrt {\frac {2}{3+\sqrt {21}}} x\right )|-\frac {5}{2}-\frac {\sqrt {21}}{2}\right )-\left (-9+\sqrt {21}\right ) F\left (i \sinh ^{-1}\left (\sqrt {\frac {2}{3+\sqrt {21}}} x\right )|-\frac {5}{2}-\frac {\sqrt {21}}{2}\right )\right )}{\sqrt {2 \left (-3+\sqrt {21}\right )}} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(3 - x^2)/Sqrt[3 - 3*x^2 - x^4],x]

[Out]

((-I)*((-3 + Sqrt[21])*EllipticE[I*ArcSinh[Sqrt[2/(3 + Sqrt[21])]*x], -5/2 - Sqrt[21]/2] - (-9 + Sqrt[21])*Ell
ipticF[I*ArcSinh[Sqrt[2/(3 + Sqrt[21])]*x], -5/2 - Sqrt[21]/2]))/Sqrt[2*(-3 + Sqrt[21])]

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 203 vs. \(2 (74 ) = 148\).
time = 0.08, size = 204, normalized size = 2.22

method result size
default \(\frac {36 \sqrt {1-\left (\frac {1}{2}+\frac {\sqrt {21}}{6}\right ) x^{2}}\, \sqrt {1-\left (\frac {1}{2}-\frac {\sqrt {21}}{6}\right ) x^{2}}\, \left (\EllipticF \left (\frac {x \sqrt {18+6 \sqrt {21}}}{6}, \frac {i \sqrt {7}}{2}-\frac {i \sqrt {3}}{2}\right )-\EllipticE \left (\frac {x \sqrt {18+6 \sqrt {21}}}{6}, \frac {i \sqrt {7}}{2}-\frac {i \sqrt {3}}{2}\right )\right )}{\sqrt {18+6 \sqrt {21}}\, \sqrt {-x^{4}-3 x^{2}+3}\, \left (-3+\sqrt {21}\right )}+\frac {18 \sqrt {1-\left (\frac {1}{2}+\frac {\sqrt {21}}{6}\right ) x^{2}}\, \sqrt {1-\left (\frac {1}{2}-\frac {\sqrt {21}}{6}\right ) x^{2}}\, \EllipticF \left (\frac {x \sqrt {18+6 \sqrt {21}}}{6}, \frac {i \sqrt {7}}{2}-\frac {i \sqrt {3}}{2}\right )}{\sqrt {18+6 \sqrt {21}}\, \sqrt {-x^{4}-3 x^{2}+3}}\) \(204\)
elliptic \(\frac {36 \sqrt {1-\left (\frac {1}{2}+\frac {\sqrt {21}}{6}\right ) x^{2}}\, \sqrt {1-\left (\frac {1}{2}-\frac {\sqrt {21}}{6}\right ) x^{2}}\, \left (\EllipticF \left (\frac {x \sqrt {18+6 \sqrt {21}}}{6}, \frac {i \sqrt {7}}{2}-\frac {i \sqrt {3}}{2}\right )-\EllipticE \left (\frac {x \sqrt {18+6 \sqrt {21}}}{6}, \frac {i \sqrt {7}}{2}-\frac {i \sqrt {3}}{2}\right )\right )}{\sqrt {18+6 \sqrt {21}}\, \sqrt {-x^{4}-3 x^{2}+3}\, \left (-3+\sqrt {21}\right )}+\frac {18 \sqrt {1-\left (\frac {1}{2}+\frac {\sqrt {21}}{6}\right ) x^{2}}\, \sqrt {1-\left (\frac {1}{2}-\frac {\sqrt {21}}{6}\right ) x^{2}}\, \EllipticF \left (\frac {x \sqrt {18+6 \sqrt {21}}}{6}, \frac {i \sqrt {7}}{2}-\frac {i \sqrt {3}}{2}\right )}{\sqrt {18+6 \sqrt {21}}\, \sqrt {-x^{4}-3 x^{2}+3}}\) \(204\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-x^2+3)/(-x^4-3*x^2+3)^(1/2),x,method=_RETURNVERBOSE)

[Out]

36/(18+6*21^(1/2))^(1/2)*(1-(1/2+1/6*21^(1/2))*x^2)^(1/2)*(1-(1/2-1/6*21^(1/2))*x^2)^(1/2)/(-x^4-3*x^2+3)^(1/2
)/(-3+21^(1/2))*(EllipticF(1/6*x*(18+6*21^(1/2))^(1/2),1/2*I*7^(1/2)-1/2*I*3^(1/2))-EllipticE(1/6*x*(18+6*21^(
1/2))^(1/2),1/2*I*7^(1/2)-1/2*I*3^(1/2)))+18/(18+6*21^(1/2))^(1/2)*(1-(1/2+1/6*21^(1/2))*x^2)^(1/2)*(1-(1/2-1/
6*21^(1/2))*x^2)^(1/2)/(-x^4-3*x^2+3)^(1/2)*EllipticF(1/6*x*(18+6*21^(1/2))^(1/2),1/2*I*7^(1/2)-1/2*I*3^(1/2))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+3)/(-x^4-3*x^2+3)^(1/2),x, algorithm="maxima")

[Out]

-integrate((x^2 - 3)/sqrt(-x^4 - 3*x^2 + 3), x)

________________________________________________________________________________________

Fricas [A]
time = 0.10, size = 18, normalized size = 0.20 \begin {gather*} \frac {\sqrt {-x^{4} - 3 \, x^{2} + 3}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+3)/(-x^4-3*x^2+3)^(1/2),x, algorithm="fricas")

[Out]

sqrt(-x^4 - 3*x^2 + 3)/x

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \frac {x^{2}}{\sqrt {- x^{4} - 3 x^{2} + 3}}\, dx - \int \left (- \frac {3}{\sqrt {- x^{4} - 3 x^{2} + 3}}\right )\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x**2+3)/(-x**4-3*x**2+3)**(1/2),x)

[Out]

-Integral(x**2/sqrt(-x**4 - 3*x**2 + 3), x) - Integral(-3/sqrt(-x**4 - 3*x**2 + 3), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+3)/(-x^4-3*x^2+3)^(1/2),x, algorithm="giac")

[Out]

integrate(-(x^2 - 3)/sqrt(-x^4 - 3*x^2 + 3), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int -\frac {x^2-3}{\sqrt {-x^4-3\,x^2+3}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(x^2 - 3)/(3 - x^4 - 3*x^2)^(1/2),x)

[Out]

int(-(x^2 - 3)/(3 - x^4 - 3*x^2)^(1/2), x)

________________________________________________________________________________________